package org.example.configuration;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.advisor.SimpleLoggerAdvisor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.util.DefaultUriBuilderFactory;

@Configuration
public class ChatClientConfiguration {

    @Bean
    public ChatClient chatClient(ChatClient.Builder chatClientBuilder){
        return chatClientBuilder
                //设置系统提示词
                .defaultSystem("你叫付子凡的小狗，是一名AI助手，擅长运用Java")
                .defaultAdvisors(new SimpleLoggerAdvisor())
                .build();
    }
}
